var load = function () {
    }
    load.getScript = function (filename) {
        var script = document.createElement('script')
        script.setAttribute("type", "text/javascript")
        script.setAttribute("src", filename)
        if (typeof script != "undefined")
            document.getElementsByTagName("head")[0].appendChild(script)
    }
    load.tryReady = function (time_elapsed) {
        //持续查询jQuery是否加载完毕
        if (typeof $ == "undefined") { // 如果没有加载jQuery...
            if (time_elapsed <= 5000) {
                setTimeout("load.tryReady(" + (time_elapsed + 200) + ")", 200); //设置200ms后继续尝试
            } else {
                alert("Failed to loading jQuery because of timeout.")
            }
        } else {
            // jQuery加载完毕后执行的代码
            $.getScript("/plugin/models/common.js");
        }
    }
    load.getScript("/plugin/jquery/jquery-1.7.1.js");
    load.tryReady(0); //用来等待jQuery类库加载